package com.xiaoc.bulldozer.common.service.impl;

import com.xiaoc.bulldozer.common.dao.AdvertiseMapper;
import com.xiaoc.bulldozer.common.dto.AdvertiseQueryDto;
import com.xiaoc.bulldozer.common.model.Advertise;
import com.xiaoc.bulldozer.common.service.AdvertiseService;
import com.xiaoc.bulldozer.common.service.AdvertiseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Advertise Service 实现类
 *
 * @author Li Ruda
 *
 * @date 2019-03-04 10:22:23
 */
@Service("advertiseService")
public class AdvertiseServiceImpl implements AdvertiseService {

    @Resource
    private AdvertiseMapper AdvertiseMapper;


    @Override
    public Integer getAdvertiseCountByCondition(AdvertiseQueryDto advertiseQueryDto) {
        return AdvertiseMapper.getAdvertiseCountByCondition(advertiseQueryDto);
    }

    @Override
    public List<Advertise> getAdvertiseListByCondition(AdvertiseQueryDto advertiseQueryDto) {
        return AdvertiseMapper.getAdvertiseListByCondition(advertiseQueryDto);
    }

    @Override
    public Advertise getAdvertiseById(Integer id) {
        return AdvertiseMapper.getAdvertiseById(id);
    }

    @Override
    public List<Advertise> getAdvertiseList(String type) {
        return AdvertiseMapper.getAdvertiseList(type);
    }

    @Override
    public void save(Advertise Advertise) {
        AdvertiseMapper.save(Advertise);
    }

    @Override
    public void update(Advertise Advertise) {
        AdvertiseMapper.update(Advertise);
    }

    @Override
    public void deleteById(Integer id) {
        AdvertiseMapper.deleteById(id);
    }

}
